package com.gexiaobao.pigeon.ui.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.gexiaobao.pigeon.R
import com.gexiaobao.pigeon.app.base.DataBindBaseViewHolder
import com.gexiaobao.pigeon.databinding.ItemGroupRaceDetailHeadBinding
import com.google.common.base.CharMatcher

/**
 * @Author      : hxw
 * @Date        : 2024/7/29 16:50
 * @Describe    :
 */
class AdapterGroupRaceDetailHead(data: ArrayList<String>, title: String) :
    BaseQuickAdapter<String, DataBindBaseViewHolder>(R.layout.item_group_race_detail_head, data) {

    private var mTitle = ""

    init {
        this.mTitle = title
    }

    override fun convert(holder: DataBindBaseViewHolder, item: String) {
        val binding = DataBindBaseViewHolder.getBinding(holder) as ItemGroupRaceDetailHeadBinding
        binding.data = item
        binding.executePendingBindings()//防止列表抖动

        holder.setText(R.id.tvHeadGroup, mTitle)
    }
}